package com.zhengze;

public class Demo11 {
    public static void main(String[] args) {
        String str = "The     quick\t\t brown   fox  jumps   over the  lazy dog.";
        String re = "\\s+";
        // replaceAll方法对str串中符合正则规则的地方进行替换
        // 并返回替换后的结果
        String rep_str = str.replaceAll(re, " ");
        System.out.println(rep_str);
    }
}

// The quick brown fox jumps over the lazy dog.